﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimpleTerminal.Common
{
    public class ProfileModel:Datastore
    {
        public List<ProfileInfo> GetAll()
        {
            List<ProfileInfo> profiles = Connection.Query<ProfileInfo>("select * from ProfileInfo order by id ASC");
            return profiles;
        }

        public bool DeleteProfile(ProfileInfo profileInfo)
        {
            return Connection.Delete<ProfileInfo>(profileInfo.Id) > 0;
        }
    }
}
